<!-- 水电气首页 -->
<template>
  <view>
    <u-navbar :title="title" :background="{background:'#fff'}" back-icon-color="#333" title-color="#333"
               :border-bottom="false"></u-navbar>
    <view class="page" v-if="menus.length>0">
      <view class="xb-card utilities"  v-for="(item,index) in menus" :key="index" v-if="item.look&&item.children.length>0">
        <view class="utilities_t">{{ item.menuName }}</view>
        <view class="utilities-c">
          <view class="utilities-col" hover-class="button-hover" v-if="item2.look" v-for="(item2,index2) in item.children" :key="index2" @click="navTo(item2.router)">
            <image :src="item2.iconPath" mode="" :style="{backgroundColor: item2.bgColor}"></image>
            <view class="">
              {{item2.menuName}}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  name:'comChilds',
  data() {
    return {
      menus:[],
      title:''
    };
  },
  created() {
    this.menus=this.$store.state.com.routerData
		this.title=this.$store.state.com.title
		if(this.title!==''){
			uni.setNavigationBarTitle({
				title:this.title
			})
		}
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>

</style>
